Skip to main content

PATCH Order

Request to update an allowed value for the order item. Supported operations:

The requests on this endpoint are processed asynchronously. After the patch operations are completed, the clients will receive a webhook notification indicating its success, in case this feature is being used.

Request

Endpoint

PATCH {clientId}/api/v2/orders/{clientOrderId}/orderItem/{orderItemId}

Headers

The PATCH Order API requires the following information in the headers of an HTTP request:

HTTP HeaderDescription
AuthorizationThe HTTP Authorization request header contains the credentials to authenticate a user agent with a server.
AcceptThe HTTP Accept request header contains information about the content types, expressed as MIME types, that the client can understand. The MIME type for the PATCH Order API request is application/json.

Path parameters

ParameterDescriptionTypeRequired/Optional
clientIdThe clientId is a unique code that is provided by LetsGetChecked. The clientId is used to identify a client, when a client calls the Orders and Results APIs. The code is formed by 1 to 4 alphanumeric characters.stringRequired
clientOrderIdThe Client Order ID is a unique code associated with the order ID in the client's system. When you use the Order API, the clientOrderId will be your reference for the order in the LetsGetChecked system. The maximum length is 100 characters.stringRequired
orderItemIdThe Order Item id returned in the GET Order Status, this is a unique code associated with the order item and it specifies what item from the order is to be updatedstringRequired

Body

The following table describes each item in the body of the request, the request body follows the standard PATCH Definition defined here:

ElementDescriptionTypeRequired/Optional
patchOperationPatch Operation object.object(patchOp)Required
patchOp/opType of operation to be performed. Allowed values: replace.stringRequired
patchOp/pathThe path for the type of operation. Allowed values: /status/code.stringRequired
patchOp/valueValue to update the order item to. Allowed values: Cancelled.stringRequired

Sample request

Order Item Cancel
[
{ "op": "replace", "path": "/status/code", "value": "Cancelled" }
]

Status Codes

Status CodeDescription
202Accepted. Requested action accepted
400Bad Request
401Unauthorized
404NotFound
422Unprocessable Entity. Order Item cannot be modified due to business rule validations
415Unsupported media type. Payload in a unsupported format
500Server Error
503Server Error

Sample Responses

202

Empty Body